home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 February / EnterCD 02_2004.iso / Gry / Arcade! Classic Arcade Pack 2.0 / Arcade.EXE / $PROGRAMFILES / Arcade! Classic Arcade Pack / snake.swf / scripts / frame_43 / DoAction.as
Encoding:
Text File  |  2003-12-05  |  641 b   |  32 lines

  1. stop();
  2. name_txt.restrict = "A-Z 0-9.:\\-";
  3. tempName = game_so.data.playerName;
  4. Selection.setFocus(name_txt);
  5. Selection.setSelection(name_txt.length,name_txt.length);
  6. ok_btn.onRollOver = function()
  7. {
  8.    ok_mc._alpha = 100;
  9. };
  10. ok_btn.onRollOut = ok_btn.onDragOut = function()
  11. {
  12.    ok_mc._alpha = 40;
  13. };
  14. ok_btn.onRelease = function()
  15. {
  16.    if(name_txt.length > 0)
  17.    {
  18.       game_so.data.playerName = name_txt.text;
  19.    }
  20.    delete tempName;
  21.    nextFrame();
  22. };
  23. ok_btn.onKeyDown = function()
  24. {
  25.    if(Key.getCode() == 13)
  26.    {
  27.       Key.removeListener(this);
  28.       this.onRelease();
  29.    }
  30. };
  31. Key.addListener(ok_btn);
  32.